﻿using AutoTest.Domain.Enums;
using SqlSugar;

namespace AutoTest.Domain.Entities
{
    /// <summary>
    /// 
    /// </summary>
    [SugarTable("t_product", TableDescription = "商品")]
    public class Product : AllBaseEntity
    {
        ///<summary>
        /// 商品主键
        ///</summary>
        [SugarColumn(IsPrimaryKey = true, ColumnName = "id", ColumnDescription = "主键Id")]
        public long Id { get; set; } = 0;
        ///<summary>
        /// 商品名称
        ///</summary>
        [SugarColumn(ColumnName = "product_name", ColumnDescription = "商品名称")]
        public string ProductName { get; set; } = string.Empty;
        ///<summary>
        /// 封面图
        ///</summary>
        [SugarColumn(ColumnName = "conver_img", ColumnDescription = "封面图")]
        public string ConverImg { get; set; } = string.Empty;
        ///<summary>
        /// 排序值
        ///</summary>
        [SugarColumn(ColumnName = "list_index", ColumnDescription = "排序值")]
        public int ListIndex { get; set; } = 0;
        ///<summary>
        /// 简介
        ///</summary>
        [SugarColumn(ColumnName = "brief_desc", ColumnDescription = "简介")]
        public string BriefDesc { get; set; } = string.Empty;
        ///<summary>
        /// 详细说明
        ///</summary>
        [SugarColumn(ColumnName = "prodct_desc", ColumnDescription = "详细说明")]
        public string ProductDesc { get; set; } = string.Empty;
        /// <summary>
        /// 前端地址
        /// </summary>
        [SugarColumn(ColumnName = "front_path", ColumnDescription = "前端地址")]
        public string FrontPath { get; set; } = string.Empty;
        ///<summary>
        /// 状态（0：无效；1：有效）
        ///</summary>
        [SugarColumn(ColumnName = "status", ColumnDescription = "状态（0：无效；1：有效）")]
        public EnumStatus Status { get; set; } = EnumStatus.Disable;
        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "create_by", ColumnDescription = "创建人")]
        public long CreateBy { get; set; }
        ///<summary>
        /// 创建时间
        ///</summary>
        [SugarColumn(ColumnName = "create_time", ColumnDescription = "创建时间")]
        public DateTime CreateTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 更新人
        /// </summary>
        [SugarColumn(ColumnName = "update_by", ColumnDescription = "更新人")]
        public long? UpdateBy { get; set; }
        ///<summary>
        /// 更新时间
        ///</summary>
        [SugarColumn(ColumnName = "update_time", ColumnDescription = "更新时间")]
        public DateTime? UpdateTime { get; set; } = DateTime.Now;


    }
}
